/*
package com.wmx.controller;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.wmx.common.RedisUtil;
import com.wmx.config.DevConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

*/
/**********************************
 * @author wmx
 * @date 2019/11/7 9:16
 * @description:
 * @version 1.0
 ************************************//*

@RestController
@RequestMapping("/sys/apollo/")
@EnableApolloConfig("dev.apollo")
public class ApolloController {
    @Autowired
    private RedisUtil redisUtil;

    @Value("${dev.apollo.name}")
    private String str;

    @Autowired
    private DevConfig devConfig;

    @RequestMapping("testNameSpace")
    public String testNameSpace() {
        return "dev.apollo.name: " + str + "对象注入" + devConfig.getMobile();
    }

    @RequestMapping("test-redis")
    public Object testRedis() {
        boolean set = redisUtil.set("name", "吴梦鑫", 500);
        if (set) {
            return redisUtil.get("name");
        } else {
            return "设置失败";
        }

    }

    ;
}
*/
